#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project ：图灵学习 
@File    ：21.必须运行父类方法的场景.py
@IDE     ：PyCharm 
@Author  ：ChenLiGao
@Date    ：2024-10-22 16:00
'''
class A:
    def __init__(self, name):
        self.name = name

    def print_info(self):
        print(self.name)
class B(A):
    def __init__(self,name, age):
        super().__init__(name)
        self.age = age

b = B("安娜", 20)
print(b.name)